package com.jvm.interpreter.instruction;

import com.jvm.interpreter.ExecEnv;
import com.jvm.interpreter.Frame;
import com.jvm.interpreter.Instruction;
import com.jvm.interpreter.MetaSpace;

/**
 * @program: diy_simple_jvm
 * @description:
 * @author: CaoYong
 * @create: 2021-07-09 11:32
 **/
public class ReturnInst implements Instruction {

    @Override
    public void eval(Frame frame) {
        ExecEnv env = MetaSpace.getMainEnv();
        env.popFrame();
        frame.pc += offset();
    }
}
